package com.baidb.service1.api;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author baidb
 * @date 2021/6/16.
 */
@RestController
@RequestMapping("/api")
public class DemoApi {

    @Value("${server.port}")
    private String port;

    @Value("${spring.cloud.consul.discovery.tags}")
    private String tags;

    @GetMapping("/demo")
    public String demo() {
        return "service1:" + port + ":" + tags;
    }

}
